package com.bd.constants;

public enum Action {

	ON_DELETE("ON DELETE"), ON_UPDATE("ON UPDATE"), ON_DELETE_NO_ACTION("NO ACTION", ON_DELETE), ON_DELETE_CASCADE("CASCADE", ON_DELETE), ON_DELETE_RESTRICT(
					"RESTRICT", ON_DELETE), ON_DELETE_SET_NULL("SET NULL", ON_DELETE), ON_UPDATE_NO_ACTION("NO ACTION", ON_UPDATE), ON_UPDATE_CASCADE(
					"CASCADE", ON_UPDATE), ON_UPDATE_RESTRICT("RESTRICT", ON_UPDATE), ON_UPDATE_SET_NULL("SET NULL", ON_UPDATE);

	private String	text;
	private Action	act;

	Action(String text) {
		this.text = text;
	}

	Action(String text, Action act) {
		this.text = text;
		this.act = act;
	}

	@Override
	public String toString() {
		return (act != null ? act : "") + " " + text;
	}
};
